<template>
  <div class="set-admin-home-links-dustbin">
    <w-nav-bar
      title="回收站"/>
    <WCell
      v-for="(v, k) in models"
      :title="v.title"
      @click="cellClick(v)"
      :content="v.link"
      :key="k"/>
    <w-dustbin
      ref="WDustbin"
      @reload="getModels"/>
  </div>
</template>

<script>
  import HomeLinksModel from '@/models/web/HomeLinksModel'
  import WCell from '@/components/mobile/cell/00'
  import WDustbin from '../../../../com/dustbin/index'
  export default {
    name: "SetAdminHomeLinksDustbin",
    components: {
      WCell,
      WDustbin
    },
    data() {
      return {
        /**
         * 模型数组
         */
        models: []
      }
    },
    methods: {
      /**
       * 获取所有数据
       */
      getModels() {
        HomeLinksModel.dustbin_all().w_then((data) => {
          this.models = data
        })
      },
      cellClick(item) {
        this.$refs['WDustbin'].show(item)
      }
    },
    mounted() {
      this.getModels()
    }
  }
</script>

<style lang="scss" scoped>
  .set-admin-home-links {

  }
</style>
